package com.journaldev.spring.service;

import java.util.List;

import org.springframework.stereotype.Service;

import com.journaldev.spring.dao.WardDAO;
import com.journaldev.spring.model.Ward;

@Service
public class WardServiceImpl implements WardService {

	private WardDAO wardDAO; 
	
	public WardDAO getWardDAO() {
		return wardDAO;
	}

	public void setWardDAO(WardDAO wardDAO) {
		this.wardDAO = wardDAO;
	}

	@Override
	public void addWard(Ward p) {
		// TODO Auto-generated method stub
		this.wardDAO.addWard(p);
	}

	@Override
	public void updateWard(Ward p) {
		// TODO Auto-generated method stub
		this.wardDAO.updateWard(p);
	}

	@Override
	public List<Ward> listWard() {
		// TODO Auto-generated method stub
		return this.wardDAO.listWard();
	}

	@Override
	public Ward getWardById(int id) {
		// TODO Auto-generated method stub
		return this.wardDAO.getWardById(id);
	}

	@Override
	public void removeWard(int id) {
		// TODO Auto-generated method stub
		this.wardDAO.removeWard(id);
	}

}
